{extend name="base" /}

{block name="bodyer"}
				当前位置：
				<a href="<?php echo url('index'); ?>" class="layui-btn layui-btn-sm fr">用户列表</a>
				<span class="layui-breadcrumb" lay-separator="/">
					<a href="<?php echo url('index'); ?>">用户管理</a>
					<a><cite>编辑用户</cite></a>
				</span>

				<fieldset class="layui-elem-field layui-field-title">
					<legend>编辑用户</legend>
				</fieldset>

				<form class="layui-form layui-form-pane" action="" method="post">
					<div class="layui-form-item">
						<label class="layui-form-label">帐号</label>
						<div class="layui-input-inline">
							<input type="text" name="username" class="layui-input" value="<?php echo $row['username']; ?>" disabled>
						</div>
					</div>

					<div class="layui-form-item">
						<label class="layui-form-label">密码</label>
						<div class="layui-input-inline">
							<input type="password" name="password" class="layui-input">
						</div>
						<div class="layui-form-mid layui-word-aux">不修改密码请留空</div>
					</div>

					<div class="layui-form-item">
						<label class="layui-form-label">所属角色</label>
						<div class="layui-input-inline">
							<select name="role_id">
								<option value="0">-- 请选择 --</option>
								<?php foreach ($role as $v): ?>
								<option value="<?php echo $v['id']; ?>"<?php echo $row['role_id'] == $v['id'] ? ' selected' : ''; ?>><?php echo str_repeat('&nbsp;', 6) , $v['name']; ?></option>
								<?php endforeach; ?>
							</select>
						</div>
					</div>

					<div class="layui-form-item">
						<label class="layui-form-label">排序</label>
						<div class="layui-input-inline">
							<input type="number" name="sort" lay-verify="number" class="layui-input" min="0" value="<?php echo $row['sort']; ?>">
						</div>
						<div class="layui-form-mid layui-word-aux">值越小越靠前</div>
					</div>

					<div class="layui-form-item">
						<label class="layui-form-label">性别</label>
						<div class="layui-input-inline">
							<?php foreach (config('gender') as $gender => $val): ?>
							<input type="radio" name="gender" value="<?php echo $gender; ?>" title="<?php echo $val; ?>"<?php echo $row['gender'] == $gender ? ' checked' : ''; ?>>
							<?php endforeach; ?>
						</div>
					</div>

					<div class="layui-form-item">
						<label class="layui-form-label">状态</label>
						<div class="layui-input-inline">
							<input type="checkbox" name="status" lay-skin="switch" lay-text="On|Off" title="开关" value="1"<?php echo empty($row['status']) ? '' : ' checked'; ?>>
						</div>
						<div class="layui-form-mid layui-word-aux">状态关闭，不能登录</div>
					</div>

					<div class="layui-form-item">
						<div class="layui-input-block">
							<button class="layui-btn" lay-submit="" lay-filter="form-user">立即提交</button>
							<button type="reset" class="layui-btn layui-btn-primary">重置</button>
						</div>
					</div>
				</form>
{/block}
